﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Arcana.Contract.Tests.Argument.All.Are
{
    [TestClass]
    public class InstanceOfAttributeTest
    {
        [Arcana.Contract.Argument.All.Are.InstanceOf("x", typeof(Exception))]
        public static void Target_1(object[] x)
        {
        }

        [TestMethod]
        [Owner("arcane_master")]
        [WorkItem(48)]
        [ExpectedException(typeof(ArgumentException))]
        public void ShouldThrowException()
        {
            Target_1(new object[] { new ArgumentException(), new Exception() });
        }

        [TestMethod]
        [Owner("arcane_master")]
        [WorkItem(48)]
        public void ShouldPass()
        {
            Target_1(new object[] { new Exception(), new Exception() });
        }
    }
}
